
<template>
  <div>
    <way></way>
    <div class="myPrize">
      <router-link to="detail">
        <img src="../../static/images/myprize@2x.png" alt="">
      </router-link>
    </div>
    <div class="banner">
      <img src="../../static/images/top_banner.jpg" alt="">
    </div>
    <div class="bg_box">
      <p class="carBody-tit">今日免费剩余<span class="color1">0</span>次</p>
      <card-index></card-index>
      <out-alert></out-alert>
    </div>
    <bottom></bottom>

  </div>

</template>

<script>
    import outAlert from './outAlert.vue'
    import cardIndex from './card_index.vue'
    import bottom from './bootom_swiper.vue'
    import Way from './gz.vue'
    export default {
        name: 'card',
        data () {
            return {}
        },
        components:{outAlert,cardIndex,bottom,Way},
        created:function(){
          this.setrem()
        },
        mounted(){
          window.onresize = this.setrem
        },
        methods:{
          //全局设置rem
          setrem:function(){
            var clientwidth= document.body.clientWidth
            $("html").css("font-size",clientwidth/375*20+"px")
          }
        }

    }
</script>

<style>
  @import '../../static/css/pops.css';
  @import '../../static/css/base.css';
  html{
    background: #dc971d;
  }
  .banner {
    width: 100%;
    height: 6.3rem;
    background: #fdc860;
  }
  .banner img {
     width: 100%;
     height: 6.325rem;
     vertical-align: bottom;
   }
  .myPrize {
    position: absolute;
    right: 0;
    top: 0;
    width: 3.425rem;
    height: 3.475rem;
  }
  .myPrize img {
    width: 100%;
    height: 100%;
  }
  .bg_box{
    background: url('../../static/images/bg.jpg') no-repeat center;
    -webkit-background-size: 100% 100%;
    background-size: 100% 100%;
    width: 100%;
    height: 17.375rem;
  }
  .carBody-tit {
    padding-top: 1.8rem;
    padding-bottom: 1.6rem;
    width: 100%;
    /* height: 2.5rem; */
    color: #ffffff;
    text-align: center;
    font-size: .5rem;
  }
  .color1 {
    display: inline-block;
    color: #ffd800;
  }
</style>

